//
//  LeftPersonInfoViewController.m
//  FeiMa
//
//  Created by 艾玩科技 on 17/2/18.
//  Copyright © 2017年 随心. All rights reserved.
//

#import "LeftPersonInfoViewController.h"
#import "LogInViewController.h"

@interface LeftPersonInfoViewController ()

@end

@implementation LeftPersonInfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];

    self.perImageView.layer.cornerRadius=40;
    self.perImageView.clipsToBounds = YES;
    [self.logOutBtn.layer setMasksToBounds:YES];
    [self.logOutBtn.layer setCornerRadius:5.0]; //设置矩形四个圆角半径
    //边框宽度
    [self.logOutBtn.layer setBorderWidth:1.0];
    //设置边框颜色有两种方法：第一种如下:
    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
    CGColorRef colorref = CGColorCreate(colorSpace,(CGFloat[]){ 255/255.0, 111/255.0, 130/255.0, 1 });
    [self.logOutBtn.layer setBorderColor:colorref];//边框颜色
    //车牌号以及救援类型的背景色
    self.perCarLabel.backgroundColor = [UIColor colorWithRed:0.910 green:0.910 blue:0.910 alpha:1.00];
    self.perCarStyleLabel.backgroundColor = [UIColor colorWithRed:0.910 green:0.910 blue:0.910 alpha:1.00];
    
    
    NSDictionary *userInfoDic = [[NSDictionary alloc] init];
    userInfoDic = [[NSUserDefaults standardUserDefaults] objectForKey:@"userdataDic"];
    //昵称
    self.perNameLabel.text = [NSString stringWithFormat:@"%@",[userInfoDic objectForKey:@"name"]];
    //手机号
    self.perTelNumLabel.text = [NSString stringWithFormat:@"%@",[userInfoDic objectForKey:@"mobile"]];
    //车牌号
    self.perCarLabel.text = [NSString stringWithFormat:@"签到车辆:%@",[userInfoDic objectForKey:@"carPlate"]];
    //车型
    self.perCarStyleLabel.text = [NSString stringWithFormat:@"车型:%@",[userInfoDic objectForKey:@"carType"]];
    
    //普通司机， 未完成订单这个按钮是不显示的
    if ([[NSString stringWithFormat:@"%@",[userInfoDic objectForKey:@"isDealer"]] integerValue] == 0) {
        self.UnFinishedBtn.hidden = YES;
        self.lastViewA.hidden = YES;
    }
}

//签出车辆
- (IBAction)signoutCar:(UIButton *)sender {
    

    
}

//退出
- (IBAction)logoutBtn:(id)sender {
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}


@end
